TextView: Be const-correct when passing a pointer
authorDaniel Boles <dboles@src.gnome.org>
Mon, 27 Mar 2017 18:14:38 +0000 (19:14 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 27 Mar 2017 18:14:38 +0000 (19:14 +0100)
The TextIter is passed by pointer for efficiency. We neither need to
modify it, nor should we leave it possible to accidentally do so. So,
it should be passed as a pointer-to-const.

gtk/gtktextview.c

index a8ad5c2fe0476735f6154ab533e657b39bd78356..03fdf97fcfda34af9c4594d700539efdf709d984 100644 (file)
@@ -6344,7 +6344,7 @@ move_cursor (GtkTextView       *text_view,
 }
 
 static gboolean
-iter_line_is_rtl (GtkTextIter *iter)
+iter_line_is_rtl (const GtkTextIter *iter)
 {
   GtkTextIter start, end;
   char *text;